import request from '@/utils/request.js'

// 获取部门
export function companyDepartment() {
  return request({
    url: '/company/department'
  })
}
// 获取简易员工；列表
export function sysUserSimple() {
  return request({
    url: '/sys/user/simple'
  })
}
// 封装删除部门api
export function delDepartment(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
// 封装新增部门api
export function addDepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 编辑部门
export function editDepartment(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
